using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TerritoryDesignTools._Analysis
{
    /// <summary>
    /// <para>Set Territory Attribute Constraints</para>
    /// <para>Sets variables for adding constraints when solving the territory solution.</para>
    /// <para>设置变量以在求解区域解时添加约束。</para>
    /// </summary>    
    [DisplayName("Set Territory Attribute Constraints")]
    public class SetTerritoryAttributeConstraints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetTerritoryAttributeConstraints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_territory_solution">
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层</para>
        /// </param>
        /// <param name="_level">
        /// <para>Level</para>
        /// <para>The level to which the constraints will be applied.</para>
        /// <para>将应用约束的级别。</para>
        /// </param>
        public SetTerritoryAttributeConstraints(object _in_territory_solution, object _level)
        {
            this._in_territory_solution = _in_territory_solution;
            this._level = _level;
        }
        public override string ToolboxName => "Territory Design Tools";

        public override string ToolName => "Set Territory Attribute Constraints";

        public override string CallName => "td.SetTerritoryAttributeConstraints";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_in_territory_solution, _level, _constraints, _out_territory_solution];

        /// <summary>
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_territory_solution { get; set; }


        /// <summary>
        /// <para>Level</para>
        /// <para>The level to which the constraints will be applied.</para>
        /// <para>将应用约束的级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Level")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _level { get; set; }


        /// <summary>
        /// <para>Constraints</para>
        /// <para><xdoc>
        ///   <para>The variables that will be used for constraining the territory solution.</para>
        ///   <bulletList>
        ///     <bullet_item>Variable—Numeric value to be used as the constraint.</bullet_item><para/>
        ///     <bullet_item>Minimum—Numeric value that sets a hard limit for the territories' lower bound.</bullet_item><para/>
        ///     <bullet_item>Maximum—Numeric value that sets a hard limit for the territories' upper bound.</bullet_item><para/>
        ///     <bullet_item>Ideal Value—Numeric value that sets a soft limit for the ideal value for the territory solution.</bullet_item><para/>
        ///     <bullet_item>Weight—The influence a constraint value has on the territory solution. The number must be greater than 0.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于约束 territory 解决方案的变量。</para>
        ///   <bulletList>
        ///     <bullet_item>变量 （Variable） - 用作约束的数值。</bullet_item><para/>
        ///     <bullet_item>最小值 - 为区域下限设置硬限制的数值。</bullet_item><para/>
        ///     <bullet_item>最大值 - 为区域上限设置硬限制的数值。</bullet_item><para/>
        ///     <bullet_item>理想值 - 为区域解的理想值设置软限制的数值。</bullet_item><para/>
        ///     <bullet_item>权重 - 约束值对区域解的影响。该数字必须大于 0。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Constraints")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _constraints { get; set; } = null;


        /// <summary>
        /// <para>Updated Territory Solution</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_territory_solution { get; set; }


        public SetTerritoryAttributeConstraints SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}